package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: luisarmando
 * Date: 1/25/13
 * Time: 11:16 AM
 * To change this template use File | Settings | File Templates.
 */
public class Book {
    private boolean isReserved;
    private String title;

    public Book(String title, boolean reserved) {
        isReserved = reserved;
        this.title = title;
    }

    public Book(String title) {
        this.title = title;
        this.isReserved = false;
    }

    public boolean isReserved() {
        return isReserved;
    }

    public void setReserved(boolean reserved) {
        isReserved = reserved;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public String toString() {
        if (isReserved())
            return title + " [reserved]";
        else
            return title;
    }
}
